# Contributor: Noel Kuntze <noel.kuntze@thermi.consulting>
# Maintainer: Noel Kuntze <noel.kuntze@thermi.consulting>
pkgname=py3-sleekxmpp
pkgver=1.3.3
pkgrel=0
pkgdesc="XMPP library written for Python 3.x"
url="https://github.com/fritzy/SleekXMPP"
arch="noarch"
# There is a third-party directory with vendored dependencies, add all that
# we package here and remove the vendored dependency in package()
depends="python3 py3-gnupg py3-pysocks py3-docutils"
license="MIT"
source="https://github.com/fritzy/SleekXMPP/archive/sleek-$pkgver.tar.gz"
builddir="$srcdir/SleekXMPP-sleek-$pkgver"

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --root="$pkgdir"

	# We don't need the tests
	rm -rf "$pkgdir"/usr/lib/python3*/site-packages/sleekxmpp/test

	# Remove vendored dependencies
	local i
	for i in gnupg socks statemachine; do
		rm -rf "$pkgdir"/usr/lib/python3*/site-packages/sleekxmpp/third-party/$i.py
	done
}

sha512sums="75ff8507fb62848db35da6f732821b5ee88ffea4c7e4880b1b7723f8d3fa9991fca4cd9c0478781b4cf63e97f37550a94e485413806849bb13303ea1f5f15a74  sleek-1.3.3.tar.gz"
